package com.sl.au.repository;

import com.sl.au.entity.AfterSaleReturnVisit;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface AfterSaleReturnVisitRepository extends JpaRepository<AfterSaleReturnVisit, String> {
    @Query(" select m from AfterSaleReturnVisit m where m.registrant like '%'+?1+'%' or m.managedcode like '%'+?1+'%' ")
    Page<AfterSaleReturnVisit> getAfterSaleReturnVisitTitle(String key, Pageable pageable);

    AfterSaleReturnVisit findById(String id);
}
